##### My (demuredemeanor) (newsbeuter) newsboat config
# Uses tabstop=4; shiftwidth=4 tabs; foldmarker={{{,}}};
# https://notabug.org/demure/dotfiles/
# legacy repo http://github.com/demure/dotfiles
# vim:set syntax=sh:

urls-source "ttrss"

ttrss-url "https://tt.demu.red"
ttrss-mode multi
ttrss-login "demure"
ttrss-password "`pass cli/newsboat`"

ttrss-flag-star "s"
ttrss-flag-publish "p"

auto-reload yes
reload-time 20
reload-threads 2
suppress-first-reload yes
#notify-beep yes
notify-screen yes
confirm-exit yes

show-read-feeds no
show-read-articles no
## Note: press 't' to sort by tag (category)
feed-sort-order unreadarticlecount-asc
article-sort-order date-desc
datetime-format "%F"
goto-next-feed no

## Bindings
# vim like navigation
bind-key j down
bind-key k up

browser $BROWSER
player mpv

## Macros
## Strips utm/etc (prob not needed)
macro o set browser "mpv --profile=pod $(echo %u | cut -d? -f1 -)"; open-in-browser ; set browser $BROWSER
## add video or audio to play queue using mpv (requires: task-spooler, mpv, youtube-dl)
macro O set browser "tsp mpv --profile=pod %u"; open-in-browser ; set browser $BROWSER
## Got for playing podcasts when %u doesn't match
macro p pipe-to "grep -Eom 1 'http.*mp3\|http.*m4a' | xargs -n1 mpv --profile=pod" ;
macro P pipe-to "grep -Eom 1 'http.*mp3\|http.*m4a' | xargs -n1 tsp mpv --profile=pod" ;
macro i set browser "feh %u"; open ; set browser $BROWSER
macro w set browser "w3m %u"; open-in-browser ; set browser $BROWSER
macro I set browser "feh %u"
macro b open-in-browser
macro B set browser $BROWSER
## copy url to clipboard "yank"
macro y set browser "echo -n %u | xclip -selection clipboard"; open-in-browser ; set browser $BROWSER


# Ivaylo Kuzev <ivkuzev@gmail.com>, 2014
# zenburn like color scheme for newsbeuter <http://www.newsbeuter.org/>

color background color188 color237
color info color223 color234
color article color188 color237
color listnormal color188 color237
color listfocus color108 color234
color listnormal_unread color108 color234
color listfocus_unread color234 color108

highlight article "^Feed:.*" color174 default
highlight article "^Title:.*" color223 color108 bold
highlight article "^Author:.*" color114 default
highlight article "^Link:.*" color116 default
highlight article "^Date:.*" color223 default
highlight article "\\[[0-9][0-9]*\\]" color66 default bold
highlight article "\\[image [0-9][0-9]*\\]" color109 default bold
highlight article "\\[embedded flash: [0-9][0-9]*\\]" color66 default bold

## podboat settings
download-path "~/.podboat/%h/%n"
max-downloads 3
player "mpv"
